import { ProductData } from '@/data/common'

interface IParams {
  params: Promise<{
    id: string
  }>
}

export default async function Page({ params }: IParams) {
  const { id } = await params
  const product = ProductData.find((item) => {
    return item.id === Number(id)
  })
  return (
    <div>
      <div>{product?.title}</div>
      <img
        src={product?.img}
        alt="Front of men&#039;s Basic Tee in black."
        className="aspect-square w-100px h-100px rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80"
      />
    </div>
  )
}
